package label_setting_algorithm_VRPTW;

import java.security.PublicKey;

// 标记类，存放当前路径到达本点的，编号，时间，成本
public class Label {
    private int id;
    private int time; // 路径中到达此点的时间
    private int cost; // 路径中到达此点的搭载量
    private int start; // 时间窗开始时间
    private int end; // 时间窗结束时间

    // 这个i j 用来溯源找到从出发点到当前点的路径
    // P.get(i).get(j)表示当前节点的上一个节点
    private int i;
    private int j;

    public Label(int id, int start, int end) {
        this.id = id;
        this.start = start;
        this.end = end;
        this.time = -1;
        this.cost = -1;
        this.i = -1;
        this.j = -1;
    }

    public Label() {

    }

    public Label(Label l) {
        this.id = l.id;
        this.time = l.time;
        this.cost = l.cost;
        this.start = l.start;
        this.end = l.end;
        this.i = l.i;
        this.j = l.j;
    }

    public int getId() {
        return id;
    }

    public int getTime() {
        return time;
    }

    public int getCost() {
        return cost;
    }

    public int getStart() {
        return start;
    }

    public int getEnd() {
        return end;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public void setCost(int cost) {
        this.cost = cost;
    }

    public int getI() {
        return i;
    }

    public void setI(int i) {
        this.i = i;
    }

    public int getJ() {
        return j;
    }

    public void setJ(int j) {
        this.j = j;
    }

    @Override
    public String toString() {
        return "Label{" +
                "id=" + id +
                ", time=" + time +
                ", cost=" + cost +
                ", start=" + start +
                ", end=" + end +
                '}';
    }
}